home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / cat_exe.zip / XOR.CAL < prev    next >
Text File  |  1994-11-18  |  894b  |  42 lines

  1. (* cp. Toffoli, p.31 *)
  2. (* program creates rhomb-like shapes and oscillates between states with few
  3.    and many 'alive' cells.
  4.    To initialize the STATE window use event e0 and turn afterwards some few cells
  5.    to alive 'by hand'. *)
  6.  
  7. RECIPE  XYSize  =  70;
  8.         XYBound =  1;
  9.         Colors =  $2;
  10.         Zet    =  $2;
  11.  
  12. CONST Dead   =  0;
  13.       Alive  =  1;
  14.  
  15. REF   North [0,-1];
  16.       South [0,1];
  17.       East  [1,0];
  18.       West  [-1,0];
  19.  
  20. EVENT SetUp;
  21.       RingForm;
  22.       RGBBrush (Dead, 00, 40, 60);
  23.       RGBBrush (Alive, 35, 213, 75);
  24.  
  25. EVENT E0; (* initialization of the cells *)
  26.      PlFillUni (Dead);
  27.      ShowPlane;
  28.  
  29. EVENT E1;
  30.     PlClipActive;
  31.     PARALLEL DO
  32.       Self := North XOR South XOR East XOR West;
  33.     OD;
  34.     ShowPlane;
  35.  
  36. END.
  37.  
  38. ********************************
  39. *  compilation o.k.            *
  40. ********************************
  41.  
  42.